<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                template="/template/MemberTemplate.xhtml">

    <ui:define name="contentInsert">
                <p:layout>
                    <h:form>
                        <h:panelGrid id="searchEventCriteria">
                            <h3>Search Event</h3>
                            <hr/>
                            Name:
                            <p:inputText value="#{userPerformanceMB.searchEventName}"/>
                            Venue:
                            <h:selectOneMenu value="#{userPerformanceMB.searchVenueName}">
                                <f:selectItem itemLabel="Select One..." itemValue= ""/>
                                <f:selectItems value="#{userPerformanceMB.getAllActiveVenues()}"></f:selectItems>
                            </h:selectOneMenu>
                            Genre:
                            <h:selectOneMenu value="#{userPerformanceMB.searchGenre}">
                                <f:selectItem itemLabel="Select One..." itemValue= ""/>
                                <f:selectItem itemLabel="Concert" itemValue="Concert"/>
                                <f:selectItem itemLabel="Dance" itemValue="Dance"/>
                                <f:selectItem itemLabel="Musical" itemValue="Musical"/>
                                <f:selectItem itemLabel="Theatre" itemValue="Theatre"/>
                                <f:selectItem itemLabel="Others" itemValue="Others"/>
                            </h:selectOneMenu>
                            Type:
                            <h:selectOneMenu value="#{userPerformanceMB.searchType}">
                                <f:selectItem itemLabel="Select One..." itemValue= ""/>
                                <f:selectItem itemLabel="Comedy" itemValue="Comedy"/>
                                <f:selectItem itemLabel="Horror" itemValue="Horror"/>
                                <f:selectItem itemLabel="Thriller" itemValue="Thriller"/>
                                <f:selectItem itemLabel="Family" itemValue="Family"/>
                                <f:selectItem itemLabel="Drama" itemValue="Drama"/>
                                <f:selectItem itemLabel="Rock" itemValue="Rock"/>
                                <f:selectItem itemLabel="Pop" itemValue="Pop"/>
                                <f:selectItem itemLabel="Rhythms and Blues" itemValue="Rhythms and Blues"/>
                                <f:selectItem itemLabel="Others" itemValue="Others"/>
                            </h:selectOneMenu>
                            Date:  
                            <p:calendar value="#{userPerformanceMB.findDate}" mindate="#{userPerformanceMB.findingMinDate()}" maxdate="#{userPerformanceMB.findingMaxDate()}" pattern="dd/MM/yyyy"/>
                            <hr/>
                            <p:commandButton value="Search" action="searchevents.xhtml?faces-redirect=true" />
                        </h:panelGrid>
                    </h:form>
                <p:layoutUnit position="center" scrollable="true">
                    <p:panel id="pnl" header="Event Information for Event #{userPerformanceMB.infoEvent}">
                        <h:inputHidden value="#{userPerformanceMB.infoId}" />
                        <h:panelGrid columns="2" columnClasses="alignTop, alignTop">
                               
                            
                            <h:column>
                                <p:graphicImage  value="./../#{userPerformanceMB.infoPoster}" width="300" height="400"/>    
                                <h4>Details</h4>
                                <h:outputText value="Type: #{userPerformanceMB.infoType}"/>
                                <br/>
                                <h:outputText value="Genre: #{userPerformanceMB.infoGenre}"/>
                                <br/>
                                <h:outputText value="Rating #{userPerformanceMB.infoRating}"/>
                                <br/>
                                <h:outputText value="Language: #{userPerformanceMB.infoLanguage}"/>
                                <br/>
                                <h:outputText value="Duration: #{userPerformanceMB.infoDuration} Minutes" />
                                <br/>
                                <h:outputText value="Organiser: #{userPerformanceMB.infoStakeholder}" />
                                <hr/>
                                <h4>Description</h4>
                                <h:outputText value="#{userPerformanceMB.infoDescription}"/>
                                <hr/>
                            <h:form>
                                <h:commandLink action="buyeventshow.xhtml?faces-redirect=true">
                                    <p:graphicImage  value="./../ticketingsymbols/Booking.gif" width="60" height="30"/>
                                    <f:setPropertyActionListener target="#{userPerformanceMB.selectedEvent}" value="#{userPerformanceMB.infoEvent}"/>
                                    <f:setPropertyActionListener target="#{userPerformanceMB.selectedEventId}" value="#{userPerformanceMB.infoId}"/>
                                    <f:setPropertyActionListener target="#{userPerformanceMB.buyShowStakeholder}" value="#{userPerformanceMB.infoStakeholder}"/>
                                </h:commandLink>
                                <h:commandLink immediate="true" action="performancemain.xhtml?faces-redirect=true">
                                    <p:graphicImage  value="./../ticketingsymbols/Back.gif" width="60" height="30"/>
                                </h:commandLink>
                            </h:form>
                            </h:column>
                        </h:panelGrid>
                    </p:panel>
                </p:layoutUnit>
            </p:layout>        
   </ui:define>
</ui:composition>
